package cn.itsource.system.mapper;

import cn.itsource.system.domain.Permission;
import cn.itsource.system.query.PermissionQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author huawei
* @description 针对表【tb_permission】的数据库操作Mapper
* @createDate 2024-06-12 11:29:28
* @Entity cn.itsource.domain.Permission
*/
public interface PermissionMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Permission record);

    Permission selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Permission record);

    int updateByPrimaryKey(Permission record);


    List<Permission> selectAll(PermissionQuery permissionQuery);

    void deleteAll(List<Permission> p);

    List<Permission> selectAllType();


    List<Permission> selectByLoginId(Long loginId);

    /**
     * 根据请求方式和查询uri查询permission
     * @param method
     * @param uri
     * @return
     */
    Permission selectByMethodTypeAndUri(@Param("methodType") String method,@Param("uri") String uri);
}
